package a.f.l.a;

import a.c.d;
import a.c.k;
import a.f.c.h;
import a.f.ed;
import a.f.hb;
import a.f.r;
import a.f.rc;
import a.i.db;

import java.util.*;

public class a
  extends r
{
  static final double g = 1.0E-006D;
  public static final String h = "y.layout.router.polyline.EdgeRouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY";
  static final boolean i = false;
  static final boolean j = false;
  static final boolean k = false;
  static final boolean l = false;
  static final Object m = "EdgeRouter.EDGE_BUNDLE_ID";
  static final Object n = "EdgeRouter.REGISTERED_EDGE_INFO_KEY";
  public static final byte o = 0;
  public static final byte p = 2;
  public static final byte q = 4;
  private static final int r = 100;
  private s s;
  private ib t;
  private pb u;
  private j v;
  private o w = new o();
  private byte x;
  private Object y = rc.d;
  private Object z = rc.c;
  private boolean A;
  private boolean B;
  private cb C;
  private boolean D = false;
  private long E = 9223372036854775807L;
  private boolean F = false;
  private double G = 30.0D;
  private double H = 0.3D;
  private double I = 10.0D;
  private List J;
  private List K;
  public static boolean L;
  
  public a(rc paramrc)
  {
    super(paramrc);
  }
  
  public a()
  {
    this(null);
  }
  
  public long b()
  {
    return this.E;
  }
  
  public void a(long paramLong)
  {
    this.E = Math.max(0L, paramLong);
  }
  
  public o c()
  {
    return this.w;
  }
  
  protected o a(d paramd)
  {
    boolean bool = sb.e;
    k localk = paramd.c().c("y.layout.router.polyline.EdgeRouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY");
    if ((bool) || (localk != null))
    {
      o localo = (o)localk.get(paramd);
      if (bool) {
        break label50;
      }
      if (localo != null) {
        return localo;
      }
    }
    label50:
    return this.w;
  }
  
  public boolean d()
  {
    return this.F;
  }
  
  public void a(boolean paramBoolean)
  {
    this.F = paramBoolean;
  }
  
  public double e()
  {
    return this.G;
  }
  
  public void a(double paramDouble)
  {
    this.G = paramDouble;
  }
  
  public double f()
  {
    return this.H;
  }
  
  public void b(double paramDouble)
  {
    this.H = paramDouble;
  }
  
  public boolean g()
  {
    return this.D;
  }
  
  public void b(boolean paramBoolean)
  {
    this.D = paramBoolean;
  }
  
  public void a(byte paramByte)
  {
    switch (paramByte)
    {
    case 0: 
    case 2: 
    case 4: 
      this.x = paramByte;
      break;
    case 1: 
    case 3: 
    default: 
      throw new IllegalArgumentException("Argument '" + paramByte + "' not allowed.");
    }
  }
  
  public byte h()
  {
    return this.x;
  }
  
  public Object i()
  {
    return this.z;
  }
  
  public void a(Object paramObject)
  {
    if (paramObject == null) {
      throw new IllegalArgumentException("null");
    }
    this.z = paramObject;
  }
  
  public Object j()
  {
    return this.y;
  }
  
  public void b(Object paramObject)
  {
    if (paramObject == null) {
      throw new IllegalArgumentException("null");
    }
    this.y = paramObject;
  }
  
  public boolean canLayout(a.f.o paramo)
  {
    return true;
  }
  
  boolean a(d paramd, a.c.q paramq)
  {
    boolean bool = sb.e;
    if ((bool) || (h() == 0)) {
      return true;
    }
    k localk = paramq.c(j());
    if ((bool) || (localk != null)) {
      if (bool) {}
    }
    return localk.getBool(paramd);
  }
  
  static boolean a(d paramd, a.f.o paramo)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    a.d.y localy = paramo.n(paramd);
    Object localObject = null;
    a.d.x localx = localy.b();
    do
    {
      do
      {
        if (!localx.e()) {
          break;
        }
        a.d.w localw = localx.a();
        if (!bool) {
          if (localObject != null)
          {
            if (bool) {
              continue;
            }
            if (Math.abs(localObject.a - localw.a) > 1.0E-006D)
            {
              if (bool) {
                continue;
              }
              if (Math.abs(localObject.b - localw.b) > 1.0E-006D) {
                return false;
              }
            }
          }
        }
        localObject = localw;
        localx.f();
      } while (i1 == 0);
    } while (bool);
    return true;
  }
  
  static boolean b(d paramd, a.f.o paramo)
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    a.d.y localy = paramo.n(paramd);
    int i1 = 0;
    label100:
    label358:
    do
    {
      if (i1 >= localy.j() - 1) {
        break;
      }
      a.d.n localn1 = localy.a(i1);
      double d1 = localn1.g();
      if (i2 != 0) {
        break label466;
      }
      if (i1 != 0)
      {
        if (bool) {
          break label100;
        }
        if (i1 != localy.j() - 1) {}
      }
      else
      {
        if (bool) {
          continue;
        }
        if (localn1.c()) {
          break label457;
        }
        if (bool) {
          continue;
        }
        if (localn1.b()) {
          break label457;
        }
        return false;
      }
      if (!bool) {
        if (0.999999D < d1)
        {
          if (bool) {
            break label184;
          }
          if (d1 < 1.000001D) {
            break label178;
          }
        }
      }
      if (!bool) {
        if (-1.000001D < d1)
        {
          if (bool) {
            break label184;
          }
          if (d1 < -0.999999D) {
            break label178;
          }
        }
      }
      if (!bool) {
        if (!localn1.c())
        {
          if (bool) {
            break label184;
          }
          if (!localn1.b()) {
            return false;
          }
        }
      }
      if ((bool) || ((0.999999D >= d1) || ((bool) || (d1 >= 1.000001D))))
      {
        if (bool) {
          continue;
        }
        if (-1.000001D < d1)
        {
          if (bool) {
            continue;
          }
          if (d1 >= -0.999999D) {}
        }
      }
      else
      {
        a.d.n localn2 = localy.a(i1 - 1);
        double d2 = localn2.d().a();
        double d3 = localn2.e().a();
        double d4 = localn1.d().a();
        double d5 = localn1.e().a();
        if (!bool)
        {
          if (localn2.c())
          {
            if (bool) {
              break label332;
            }
            if (d2 < d3)
            {
              if (bool) {
                break label349;
              }
              if (d4 > d5) {
                break label348;
              }
            }
          }
          if (bool) {
            break label358;
          }
        }
        if (d2 > d3)
        {
          if (bool) {
            break label358;
          }
          if (d4 < d5) {
            return false;
          }
        }
        double d6 = localn2.d().b();
        double d7 = localn2.e().b();
        double d8 = localn1.d().b();
        double d9 = localn1.e().b();
        if (!bool) {
          if (localn2.b())
          {
            if (bool) {
              break label434;
            }
            if (d6 < d7)
            {
              if (bool) {
                break label456;
              }
              if (d8 > d9) {
                break label455;
              }
            }
          }
        }
        if (bool) {
          continue;
        }
        if (d6 > d7)
        {
          if (bool) {
            continue;
          }
          if (d8 < d9) {
            return false;
          }
        }
      }
      i1++;
    } while (i2 == 0);
    label178:
    label184:
    label332:
    label348:
    label349:
    return true;
  }
  
  private static a.d.n[] a(List paramList)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    if (((!bool) && (paramList == null)) || ((bool) || (paramList.size() == 0))) {
      return new a.d.n[0];
    }
    ArrayList localArrayList = new ArrayList();
    Iterator localIterator = paramList.iterator();
    do
    {
      do
      {
        a.d.n localn;
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          localn = (a.d.n)localIterator.next();
        } while (localn.h() <= 1.0E-006D);
        if ((bool) || (bool)) {
          break label119;
        }
        if (i1 != 0) {
          break label115;
        }
        localArrayList.add(localn);
      } while (bool);
    } while (i1 == 0);
    label115:
    label119:
    return (a.d.n[])localArrayList.toArray(new a.d.n[localArrayList.size()]);
  }
  
  private static a.d.y a(a.d.y paramy)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    if ((bool) || ((paramy == null) || ((bool) || (paramy.j() <= 1)))) {
      return paramy;
    }
    ArrayList localArrayList = new ArrayList(paramy.j());
    Object localObject = null;
    a.d.x localx = paramy.b();
    do
    {
      if (!localx.e()) {
        break;
      }
      a.d.w localw = localx.a();
      if ((bool) || (localObject != null))
      {
        if (bool) {
          continue;
        }
        if (localObject.equals(localw)) {}
      }
      else
      {
        localArrayList.add(localw);
      }
      localObject = localw;
      localx.f();
    } while (i1 == 0);
    return new a.d.y(localArrayList);
  }
  
  static a.d.n[] c(d paramd, a.f.o paramo)
  {
    boolean bool2 = sb.e;
    int i1 = sb.d;
    ArrayList localArrayList = new ArrayList();
    boolean bool1 = false;
    Object localObject = null;
    a.d.n localn = null;
    a.d.y localy = a(paramo.n(paramd));
    if (!bool2) {
      if (localy.j() <= 1) {
        return new a.d.n[0];
      }
    }
    a.d.v localv = localy.l();
    label166:
    label195:
    label224:
    do
    {
      do
      {
        if (!localv.e()) {
          break;
        }
        localn = (a.d.n)localv.j();
        if (i1 != 0) {
          break label370;
        }
        if ((bool2) || (localObject == null))
        {
          localObject = localn.d();
          bool1 = localn.b();
          if (bool2) {
            continue;
          }
          if (i1 == 0) {}
        }
        else
        {
          if (!bool2) {
            if (localn.b())
            {
              if (bool2) {
                break label195;
              }
              if (!bool1) {
                break label166;
              }
            }
          }
          if (!bool2) {
            if (localn.c())
            {
              if (bool2) {
                break label224;
              }
              if (bool1)
              {
                localArrayList.add(new a.d.n((a.d.w)localObject, localn.d()));
                localObject = localn.d();
                if (!bool2) {}
                bool1 = !bool1;
                if (bool2) {
                  continue;
                }
                if (i1 == 0) {
                  break label332;
                }
              }
            }
          }
          if (bool2) {
            continue;
          }
          if (!localn.c())
          {
            if (bool2) {
              continue;
            }
            if (!localn.b())
            {
              a.d.w localw1 = localn.e();
              a.d.w localw2 = bool1 ? new a.d.w(((a.d.w)localObject).a(), localw1.b()) : new a.d.w(localw1.a(), ((a.d.w)localObject).b());
              localArrayList.add(new a.d.n((a.d.w)localObject, localw2));
              localObject = localw2;
              if (!bool2) {}
              bool1 = !bool1;
            }
          }
        }
        localv.f();
      } while (i1 == 0);
    } while (bool2);
    label332:
    localArrayList.add(new a.d.n((a.d.w)localObject, localn.e()));
    label370:
    return a(localArrayList);
  }
  
  public void c(boolean paramBoolean)
  {
    this.A = paramBoolean;
  }
  
  public boolean k()
  {
    return this.A;
  }
  
  public void d(boolean paramBoolean)
  {
    this.B = paramBoolean;
  }
  
  public boolean l()
  {
    return this.B;
  }
  
  public cb m()
  {
    return this.C;
  }
  
  public void a(cb paramcb)
  {
    this.C = paramcb;
  }
  
  public void c(double paramDouble)
  {
    this.I = paramDouble;
  }
  
  public double n()
  {
    return this.I;
  }
  
  protected s a(ib paramib)
  {
    return new s(paramib);
  }
  
  protected void a(s params)
  {
    int i1 = sb.d;
    List localList = o();
    Iterator localIterator = localList.iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      t localt = (t)localIterator.next();
      params.a(localt);
    } while (i1 == 0);
  }
  
  protected void b(s params)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    List localList = o();
    Iterator localIterator = localList.iterator();
    if (localIterator.hasNext()) {}
    do
    {
      t localt = (t)localIterator.next();
      localt.a();
      params.b(localt);
      if ((!bool) && (i1 != 0)) {
        return;
      }
      if (i1 == 0) {
        break;
      }
      this.s.c();
    } while (bool);
    this.s = null;
  }
  
  public List o()
  {
    if (!sb.e) {
      if (this.J == null)
      {
        this.J = new ArrayList();
        this.J.add(new w());
        this.J.add(new x());
        this.J.add(new v());
        this.J.add(new bb());
        this.J.add(new z());
        this.J.add(new ab());
        this.J.add(new y());
      }
    }
    return this.J;
  }
  
  protected pb p()
  {
    return new pb();
  }
  
  protected void a(pb parampb)
  {
    int i1 = sb.d;
    List localList = q();
    Iterator localIterator = localList.iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      sb localsb = (sb)localIterator.next();
      parampb.a(localsb);
    } while (i1 == 0);
  }
  
  public List q()
  {
    if (!sb.e) {
      if (this.K == null)
      {
        this.K = new ArrayList();
        this.K.add(new vb());
        this.K.add(new wb());
        this.K.add(new bc());
        this.K.add(new ac());
        this.K.add(new dc());
        this.K.add(new tb());
        this.K.add(new zb());
        this.K.add(new cc());
        this.K.add(new ub());
        this.K.add(new jc());
        this.K.add(new xb());
        this.K.add(new fc());
        this.K.add(new ic());
        this.K.add(new yb());
        this.K.add(new ec());
        this.K.add(new kc());
        this.K.add(new gc());
        this.K.add(new hc());
      }
    }
    return this.K;
  }
  
  protected j r()
  {
    return new j();
  }
  
  protected l s()
  {
    return new l();
  }
  
  protected rb a(pb parampb, qb paramqb)
  {
    return new rb(parampb, paramqb);
  }
  
  protected qb a(a.f.o paramo, h paramh)
  {
    return new qb(paramo, paramh, this);
  }
  
  public void doLayout(a.f.o paramo)
  {
    boolean bool2 = sb.e;
    int i5 = sb.d;
    if ((bool2) || (a() != null)) {
      a().doLayout(paramo);
    }
    if (paramo.m() == 0) {
      return;
    }
    kb localkb = new kb(paramo, this);
    localkb.b();
    localkb.e();
    int i1 = 0;
    a.c.m localm1 = paramo.w();
    do
    {
      if (!localm1.e()) {
        break;
      }
      if (i5 != 0) {
        break label126;
      }
      if (a(localm1.a(), paramo))
      {
        i1 = 1;
        if (!bool2) {
          if (i5 == 0) {
            break;
          }
        }
      }
      else
      {
        localm1.f();
      }
    } while (i5 == 0);
    if ((!bool2) && (i1 == 0)) {
      label126:
      return;
    }
    long l1 = System.currentTimeMillis();
    mb.g();
    h localh = new h(paramo);
    this.s = a(u());
    a(this.s);
    qb localqb = a(paramo, localh);
    localqb.a(l1);
    this.s.a(localqb);
    this.u = v();
    a(this.u);
    this.u.a(localqb);
    this.v = w();
    paramo.a(n, db.b());
    paramo.a(new Comparator()
    {
      private final a.f.o val$graph;
      
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        boolean bool = sb.e;
        d locald1 = (d)paramAnonymousObject1;
        double d1 = a.d.w.a(this.val$graph.o(locald1.e()), this.val$graph.o(locald1.f()));
        d locald2 = (d)paramAnonymousObject2;
        double d2 = a.d.w.a(this.val$graph.o(locald2.e()), this.val$graph.o(locald2.f()));
        if (!bool) {
          if (d1 < d2) {
            return -1;
          }
        }
        if (!bool) {
          if (d2 < d1) {
            return 1;
          }
        }
        return 0;
      }
    });
    try
    {
      if (!bool2) {}
      int i2 = b() == 9223372036854775807L ? 1 : 0;
      int i3 = 0;
      if (i2 == 0)
      {
        localObject1 = paramo.w();
        do
        {
          if (!((a.c.m)localObject1).e()) {
            break;
          }
          if (!bool2)
          {
            if (a((d)((a.c.m)localObject1).j(), paramo)) {
              i3++;
            }
            ((a.c.m)localObject1).f();
          }
        } while (i5 == 0);
      }
      Object localObject1 = new a.c.ab();
      rb localrb = a(this.u, localqb);
      if (!bool2)
      {
        if (i2 != 0) {
          localrb.c(9223372036854775807L);
        }
      }
      else {
        if (i5 == 0) {
          break label409;
        }
      }
      long l2 = b() / Math.max(1, i3);
      long l3 = Math.max(100L, l2);
      localrb.c(l3);
      label409:
      a.c.n localn = db.b();
      a.c.ab localab = new a.c.ab();
      e_ locale_ = new e_(paramo);
      break label634;
      Object localObject3;
      label539:
      label620:
      Object localObject4;
      label634:
      do
      {
        if (locale_.hasNext())
        {
          d locald2;
          ob localob;
          do
          {
            localObject2 = (a.c.ab)locale_.next();
            localObject3 = new a.c.ab();
            a.c.m localm2 = ((a.c.ab)localObject2).l();
            do
            {
              if (!localm2.e()) {
                break;
              }
              d locald1 = localm2.a();
              if (i5 != 0) {
                break label539;
              }
              if (a(locald1, paramo)) {
                ((a.c.ab)localObject3).add(locald1);
              }
              localm2.f();
            } while (i5 == 0);
            localrb.a((a.c.ab)localObject3);
            if ((!bool2) && (i2 != 0))
            {
              localrb.a(9223372036854775807L);
              if (bool2) {
                break label620;
              }
              if (i5 == 0) {}
            }
            else
            {
              int i4 = i3 - localab.size();
              double d = (bool2) || (i4 > 0) ? ((a.c.ab)localObject3).size() / i4 : 1.0D;
              localrb.a((d * localqb.d()));
            }
            this.u.b(localrb);
            localObject4 = localrb.k();
            Iterator localIterator = ((a.c.ab)localObject3).iterator();
            if (!localIterator.hasNext()) {
              break;
            }
            locald2 = (d)localIterator.next();
            localob = ((lc)localObject4).b(locald2);
          } while (i5 != 0);
          if (localob == null)
          {
            localn.a(locald2, false);
            ((a.c.ab)localObject1).add(locald2);
            if (bool2) {
              break label723;
            }
            if (i5 == 0) {
              break;
            }
          }
          localn.a(locald2, true);
          localab.add(locald2);
          if (i5 == 0) {
            break;
          }
        }
      } while (bool2);
      label723:
      boolean bool1 = false;
      Object localObject2 = w();
      ((j)localObject2).a(localqb);
      if (!bool2)
      {
        if (!localab.isEmpty())
        {
          ((j)localObject2).a(localab, localrb.k());
          bool1 = localrb.k().a();
        }
        a(paramo, (a.c.ab)localObject1);
      }
      if (!bool2)
      {
        if (g())
        {
          if (bool2) {
            break label914;
          }
          if (localqb.d() > 0L)
          {
            localObject3 = a(paramo, localab, localn, 0.1D);
            a((a.c.ab)localObject3, localrb, localqb);
            bool1 |= localrb.k().a();
            if (bool2) {
              break label914;
            }
            if (localqb.d() > 0L)
            {
              localObject3 = a(paramo, localab, localn, 0.1D);
              a((a.c.ab)localObject3, localrb, localqb);
              bool1 |= localrb.k().a();
            }
          }
        }
        if (bool2) {
          break label1095;
        }
      }
      if (d())
      {
        label914:
        localObject3 = new q();
        if ((bool2) || ((bool1) || (!((a.c.ab)localObject1).isEmpty())))
        {
          localObject4 = new c(null);
          ((c)localObject4).c(this.G);
          ((c)localObject4).b(this.H);
          ((c)localObject4).a(localqb.c().n());
          ((c)localObject4).b(j());
          ((c)localObject4).a(i());
          if (!bool2) {}
          if (!bool2) {}
          byte b = h() == 2 ? 2 : h() == 0 ? 0 : 4;
          ((c)localObject4).a(b);
          ((c)localObject4).doLayout(paramo);
          if (bool2) {
            break label1099;
          }
          if (i5 == 0) {}
        }
        else
        {
          ((q)localObject3).b(this.G);
          ((q)localObject3).a(this.H);
          ((q)localObject3).a(localab, localrb.k(), localqb);
        }
      }
      label1095:
      c(paramo);
    }
    finally
    {
      label1099:
      b(this.s);
      this.u.d();
      this.v.a();
      paramo.j(n);
      localh.e();
    }
    try
    {
      paramo.a(b.g, new a.i.p()
      {
        public Object get(Object paramAnonymousObject)
        {
          return a.this.a((d)paramAnonymousObject);
        }
      });
      new b(d()).doLayout(paramo);
    }
    finally
    {
      paramo.j(b.g);
    }
    localkb.f();
  }
  
  private void c(a.f.o paramo)
  {
    a.i.y localy = new a.i.y(paramo);
    localy.d();
    hb localhb = new hb();
    localhb.doLayout(paramo);
    localy.g();
  }
  
  private boolean b(d paramd)
  {
    k localk = paramd.c().c(ed.c);
    return (sb.e) || ((localk != null) && (localk.get(paramd) != null));
  }
  
  private a.c.ab a(a.f.o paramo, a.c.ab paramab, a.c.n paramn, double paramDouble)
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    if (paramDouble >= 1.0D) {
      return paramab;
    }
    a.c.ab localab = new a.c.ab();
    a.c.n localn1 = db.b();
    a.c.n localn2 = db.b();
    a.c.n localn3 = db.b();
    a.c.z localz = new a.c.z();
    a.c.m localm = paramo.w();
    Object localObject2;
    label191:
    label193:
    label196:
    do
    {
      do
      {
        do
        {
          if (!localm.e()) {
            break label196;
          }
          localObject1 = localm.a();
          localn2.a(localObject1, paramo.m((d)localObject1).size());
          if (i2 != 0) {
            break label253;
          }
          if (b((d)localObject1, paramo))
          {
            localObject2 = paramo.n((d)localObject1).l();
            do
            {
              if (!((a.d.v)localObject2).e()) {
                break;
              }
              a.d.n localn = ((a.d.v)localObject2).a();
              localz.add(new d_((d)localObject1, localn, null));
              ((a.d.v)localObject2).f();
              if (bool) {
                break label193;
              }
              if (i2 != 0) {
                break label191;
              }
            } while (i2 == 0);
          }
        } while (bool);
        localm.f();
      } while (i2 == 0);
      a.d.m.a(localz, new m.g_()
      {
        private final a.c.n val$edge2Crossing;
        private final a.c.n val$edge2IsRouted;
        private final a.c.n val$edge2Reroute;
        private final a.c.ab val$rerouteEdges;
        
        public void a(Object paramAnonymousObject1, Object paramAnonymousObject2)
        {
          boolean bool = sb.e;
          a.d_ locald_1 = (a.d_)paramAnonymousObject1;
          a.d_ locald_2 = (a.d_)paramAnonymousObject2;
          if ((bool) || (a.d.n.a(locald_1.a, locald_2.a) != null))
          {
            if (locald_1.b == locald_2.b)
            {
              this.val$edge2Crossing.a(locald_1.b, this.val$edge2Crossing.getInt(locald_1.b) + 1);
              if (((!bool) && (!this.val$edge2IsRouted.getBool(locald_1.b))) || ((!bool) && (a.this.b(locald_1.b)))) {
                return;
              }
              if (!bool)
              {
                if (this.val$edge2Reroute.getBool(locald_1.b)) {
                  return;
                }
                this.val$rerouteEdges.add(locald_1.b);
                this.val$edge2Reroute.a(locald_1.b, true);
                if (bool) {}
              }
              else if (sb.d == 0)
              {
                return;
              }
            }
            else
            {
              this.val$edge2Crossing.a(locald_1.b, this.val$edge2Crossing.getInt(locald_1.b) + 1);
            }
            this.val$edge2Crossing.a(locald_2.b, this.val$edge2Crossing.getInt(locald_2.b) + 1);
          }
        }
      });
      paramab.a(new c_(localn2, localn3, null));
    } while (bool);
    label253:
    int i1 = Math.min(3, (int)Math.ceil(paramab.size() * paramDouble));
    Object localObject1 = paramab.l();
    if (((a.c.m)localObject1).e()) {}
    for (;;)
    {
      if (i2 == 0)
      {
        if (localab.size() < i1)
        {
          localObject2 = ((a.c.m)localObject1).a();
          if (!bool)
          {
            if (!b((d)localObject2))
            {
              if (bool) {
                break label353;
              }
              if (!localn1.getBool(localObject2))
              {
                localn1.a(localObject2, true);
                localab.add(localObject2);
              }
            }
            ((a.c.m)localObject1).f();
          }
          label353:
          if (i2 == 0) {
            break;
          }
        }
        if (!bool) {
          a(localab);
        }
      }
    }
    return localab;
  }
  
  private static void a(a.c.z paramz)
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    a.i.wb localwb = new a.i.wb(42L);
    Object[] arrayOfObject = paramz.toArray();
    localwb.a(arrayOfObject);
    paramz.clear();
    do
    {
      for (int i1 = 0; i2 == 0; i1++)
      {
        if (i1 >= arrayOfObject.length) {
          break;
        }
        paramz.add(arrayOfObject[i1]);
      }
    } while (bool);
  }
  
  private void a(a.c.ab paramab, rb paramrb, qb paramqb)
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    a.f.o localo = paramqb.a();
    lc locallc = paramrb.k();
    a.c.n localn1 = (a.c.n)localo.c(n);
    Object localObject1 = localo.w();
    Object localObject3;
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      if (!bool)
      {
        if (locallc.b((d)localObject2) != null)
        {
          localObject3 = locallc.a((d)localObject2);
          ((n)localObject3).a();
        }
        ((a.c.m)localObject1).f();
      }
    } while (i2 == 0);
    localObject1 = new a.c.ab();
    Object localObject2 = new f_(paramab, localo);
    label150:
    label304:
    label306:
    label309:
    do
    {
      do
      {
        if (!((Iterator)localObject2).hasNext()) {
          break label549;
        }
        Object localObject4;
        Object localObject5;
        fb.b_ localb_;
        do
        {
          a.c.n localn2;
          int i1;
          do
          {
            localObject3 = (a.c.ab)((Iterator)localObject2).next();
            localn2 = db.b();
            if (i2 != 0) {
              break;
            }
            a.c.m localm = ((a.c.ab)localObject3).l();
            do
            {
              if (!localm.e()) {
                break label309;
              }
              localObject4 = localm.a();
              paramrb.a().a((d)localObject4, null);
              localObject5 = (a.c.z)localn1.get(localObject4);
              localn2.a(localObject4, localObject5);
              localn1.a(localObject4, null);
              if (bool) {
                break label150;
              }
              if (i2 != 0) {
                break;
              }
              localy = ((a.c.z)localObject5).h();
              do
              {
                do
                {
                  if (!localy.e()) {
                    break;
                  }
                  localb_ = (fb.b_)localy.j();
                  localb_.e();
                  localy.f();
                  if (bool) {
                    break label306;
                  }
                  if (i2 != 0) {
                    break label304;
                  }
                } while (i2 == 0);
              } while (bool);
              localm.f();
            } while (i2 == 0);
            paramrb.a((a.c.ab)localObject3);
            v().b(paramrb);
            i1 = 0;
          } while (bool);
          localObject4 = ((a.c.ab)localObject3).l();
          do
          {
            do
            {
              if (!((a.c.m)localObject4).e()) {
                break label402;
              }
              localObject5 = ((a.c.m)localObject4).a();
              if (bool) {
                break label150;
              }
              if (i2 != 0) {
                break;
              }
              if (locallc.b((d)localObject5) == null)
              {
                i1 = 1;
                if (bool) {
                  break label409;
                }
                if (i2 == 0) {
                  break label402;
                }
              }
              ((a.c.m)localObject4).f();
            } while (i2 == 0);
          } while (bool);
          if (bool) {
            break label546;
          }
          if (i1 == 0) {
            break label531;
          }
          localObject4 = ((a.c.ab)localObject3).l();
          if (!((a.c.m)localObject4).e()) {
            break;
          }
          localObject5 = (a.c.z)localn2.get(((a.c.m)localObject4).a());
        } while (i2 != 0);
        a.c.y localy = ((a.c.z)localObject5).h();
        do
        {
          do
          {
            if (!localy.e()) {
              break;
            }
            localb_ = (fb.b_)localy.j();
            localb_.a();
            localy.f();
            if (bool) {
              break label528;
            }
            if (i2 != 0) {
              break label526;
            }
          } while (i2 == 0);
        } while (bool);
        ((a.c.m)localObject4).f();
        if (i2 == 0) {
          break;
        }
        ((a.c.ab)localObject1).addAll((Collection)localObject3);
      } while (bool);
    } while (i2 == 0);
    label402:
    label409:
    label546:
    label549:
    if (!bool) {
      if (!((a.c.ab)localObject1).isEmpty()) {
        w().a((a.c.ab)localObject1, locallc);
      }
    }
    label526:
    label528:
    label531:
    return;
  }
  
  private void a(a.f.o paramo, a.c.ab paramab)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    if (paramab.isEmpty()) {
      return;
    }
    a.c.n localn = paramo.C();
    Object localObject = paramab.l();
    if (((a.c.m)localObject).e())
    {
      localn.a(((a.c.m)localObject).a(), true);
      ((a.c.m)localObject).f();
    }
    for (;;)
    {
      if ((bool) || (i1 == 0))
      {
        if (i1 == 0) {
          break;
        }
        if (!bool) {
          paramo.a("EDGES_WITHOUT_ROUTE_DPKEY", localn);
        }
      }
    }
    localObject = new a.f.l.c();
    HashSet localHashSet = new HashSet(paramab);
    paramo.a(a.f.l.c.g, new a.i.p()
    {
      private final HashSet val$edgesWithoutRouteSet;
      
      public boolean getBool(Object paramAnonymousObject)
      {
        return this.val$edgesWithoutRouteSet.contains(paramAnonymousObject);
      }
    });
    ((a.f.l.c)localObject).doLayout(paramo);
    paramo.j(a.f.l.c.g);
  }
  
  public s t()
  {
    return this.s;
  }
  
  private ib u()
  {
    if (!sb.e) {
      if (this.t == null) {
        this.t = s();
      }
    }
    return this.t;
  }
  
  pb v()
  {
    if (!sb.e) {
      if (this.u == null) {
        this.u = p();
      }
    }
    return this.u;
  }
  
  private j w()
  {
    if (!sb.e) {
      if (this.v == null) {
        this.v = r();
      }
    }
    return this.v;
  }
  
  private static class f_
    implements Iterator
  {
    private final a.c.y a;
    private final a.c.z b = new a.c.z();
    
    f_(a.c.ab paramab, a.f.o paramo)
    {
      k localk = paramo.c(a.m);
      HashMap localHashMap = new HashMap();
      a.c.m localm = paramab.l();
      label203:
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        if (i != 0) {
          return;
        }
        if (!bool) {}
        Object localObject = localk == null ? null : localk.get(locald);
        if (!bool) {
          if (localObject == null)
          {
            this.b.add(new a.c.ab(locald));
            if (bool) {
              continue;
            }
            if (i == 0) {
              break label203;
            }
          }
        }
        a.c.ab localab1 = (a.c.ab)localHashMap.get(localObject);
        if (!bool) {
          if (localab1 == null)
          {
            a.c.ab localab2 = new a.c.ab(locald);
            localHashMap.put(localObject, localab2);
            this.b.add(localab2);
            if (bool) {
              continue;
            }
            if (i == 0) {
              break label203;
            }
          }
        }
        localab1.add(locald);
        localm.f();
      } while (i == 0);
      if (!bool) {
        this.a = this.b.h();
      }
    }
    
    public boolean hasNext()
    {
      return this.a.e();
    }
    
    public Object next()
    {
      if (!sb.e) {
        if (!this.a.e()) {
          return null;
        }
      }
      Object localObject = this.a.j();
      this.a.f();
      return localObject;
    }
    
    public void remove()
    {
      throw new UnsupportedOperationException();
    }
  }
  
  private static class d_
    implements a.d.p
  {
    private final a.d.n a;
    private final d b;
    
    private d_(d paramd, a.d.n paramn)
    {
      this.b = paramd;
      this.a = paramn;
    }
    
    public a.d.t a()
    {
      return this.a.a();
    }
    
    d_(d paramd, a.d.n paramn, a.0 param0)
    {
      this(paramd, paramn);
    }
  }
  
  private static class c_
    implements Comparator
  {
    private k a;
    private k c;
    
    private c_(k paramk1, k paramk2)
    {
      this.a = paramk1;
      this.c = paramk2;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool = sb.e;
      int i = this.a.getInt(paramObject1) + this.c.getInt(paramObject1);
      int j = this.a.getInt(paramObject2) + this.c.getInt(paramObject2);
      if (!bool)
      {
        if (i < j) {
          return 1;
        }
        if (bool) {}
      }
      else if (i > j)
      {
        return -1;
      }
      return 0;
    }
    
    c_(k paramk1, k paramk2, a.0 param0)
    {
      this(paramk1, paramk2);
    }
  }
  
  static class e_
    implements Iterator
  {
    private final a.c.y a;
    private final a.c.z b = new a.c.z();
    
    e_(a.f.o paramo)
    {
      k localk = paramo.c(a.m);
      HashMap localHashMap = new HashMap();
      a.c.m localm = paramo.w();
      label200:
      do
      {
        if (!localm.e()) {
          break;
        }
        d locald = localm.a();
        if (i != 0) {
          return;
        }
        if (!bool) {}
        Object localObject = localk == null ? null : localk.get(locald);
        if (!bool) {
          if (localObject == null)
          {
            this.b.add(new a.c.ab(locald));
            if (bool) {
              continue;
            }
            if (i == 0) {
              break label200;
            }
          }
        }
        a.c.ab localab1 = (a.c.ab)localHashMap.get(localObject);
        if (!bool) {
          if (localab1 == null)
          {
            a.c.ab localab2 = new a.c.ab(locald);
            localHashMap.put(localObject, localab2);
            this.b.add(localab2);
            if (bool) {
              continue;
            }
            if (i == 0) {
              break label200;
            }
          }
        }
        localab1.add(locald);
        localm.f();
      } while (i == 0);
      if (!bool) {
        this.a = this.b.h();
      }
    }
    
    public boolean hasNext()
    {
      return this.a.e();
    }
    
    public Object next()
    {
      if (!sb.e) {
        if (!this.a.e()) {
          return null;
        }
      }
      Object localObject = this.a.j();
      this.a.f();
      return localObject;
    }
    
    public void remove()
    {
      throw new UnsupportedOperationException();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.a

 * JD-Core Version:    0.7.0.1

 */